package com.shujia.day17.lambda2;


import java.util.ArrayList;

public class FilterSalary implements Filter {
    public ArrayList<Staff> filter(ArrayList<Staff> list) {
        ArrayList<Staff> staff1 = new ArrayList<>();
        for (Staff staff : list) {
            if (staff.salary >= 20000) {
                staff1.add(staff);
            }
        }
        return staff1;

    }
}
